﻿'Author : Ahmad M. Abdan
'Cration Date : 24/07/2012
'Descreption : Procedure of Material Request Page 

Public Class DBVoucherLinesSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ID As New TableField("ID", Data.SqlDbType.Int)
    Public VoucherID As New TableField("VoucherID", Data.SqlDbType.Int)
    Public TransYear As New TableField("TransYear", Data.SqlDbType.Int)
    Public PayOrderNo As New TableField("PayOrderNo", Data.SqlDbType.Int)
    Public ProgramNo As New TableField("ProgramNo", Data.SqlDbType.NVarChar)
    Public AccountNo As New TableField("AccountNo", Data.SqlDbType.Int)
    Public CostCenter As New TableField("CostCenter", Data.SqlDbType.Int)
    Public Debit As New TableField("Debit", Data.SqlDbType.Money)
    Public Credit As New TableField("Credit", Data.SqlDbType.Money)
    Public RecordStatus As New TableField("RecordStatus", Data.SqlDbType.Int)
    Public LastUpdateBy As New TableField("LastUpdateBy", Data.SqlDbType.NVarChar)
    Public LastUpdateDate As New TableField("LastUpdateDate", Data.SqlDbType.DateTime)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "VoucherLinesSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ID As String = "", _
                                 Optional ByVal VoucherID As String = "", _
                                 Optional ByVal TransYear As String = "", _
                                 Optional ByVal PayOrderNo As String = "", _
                                 Optional ByVal ProgramNo As String = "", _
                                 Optional ByVal AccountNo As String = "", _
                                 Optional ByVal CostCenter As String = "", _
                                 Optional ByVal Debit As String = "", _
                                 Optional ByVal Credit As String = "", _
                                 Optional ByVal RecordStatus As String = "", _
                                 Optional ByVal LastUpdateBy As String = "", _
                                 Optional ByVal LastUpdateDate As String = "", _
                                 Optional ByVal Remarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ID.SetValue(ID, MyBase.FieldsArrayList)
        Me.VoucherID.SetValue(VoucherID, MyBase.FieldsArrayList)
        Me.TransYear.SetValue(TransYear, MyBase.FieldsArrayList)
        Me.PayOrderNo.SetValue(PayOrderNo, MyBase.FieldsArrayList)
        Me.ProgramNo.SetValue(ProgramNo, MyBase.FieldsArrayList)
        Me.AccountNo.SetValue(AccountNo, MyBase.FieldsArrayList)
        Me.CostCenter.SetValue(CostCenter, MyBase.FieldsArrayList)
        Me.Debit.SetValue(Debit, MyBase.FieldsArrayList)
        Me.Credit.SetValue(Credit, MyBase.FieldsArrayList)
        Me.RecordStatus.SetValue(RecordStatus, MyBase.FieldsArrayList)
        Me.LastUpdateBy.SetValue(LastUpdateBy, MyBase.FieldsArrayList)
        Me.LastUpdateDate.SetValue(LastUpdateDate, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
